package jnausb;

public class DeviceDescriptor
    extends com.sun.jna.Structure
{
  public byte bLength;
  public byte bDescriptorType;
  public short bcdUSB;
  public byte bDeviceClass;
  public byte bDeviceSubClass;
  public byte bDeviceProtocol;
  public byte bMaxPacketSize0;
  public short idVendor;
  public short idProduct;
  public short bcdDevice;
  public byte iManufacturer;
  public byte iProduct;
  public byte iSerialNumber;
  public byte bNumConfigurations;

  public DeviceDescriptor()
  {
    super();
  }

  protected ByReference newByReference()
  {
    ByReference reference = new ByReference();
    reference.useMemory(getPointer());
    write();
    reference.read();
    return reference;
  }

  protected ByValue newByValue()
  {
    ByValue value = new ByValue();
    value.useMemory(getPointer());
    write();
    value.read();
    return value;
  }

  protected DeviceDescriptor newInstance()
  {
    DeviceDescriptor descriptor = new DeviceDescriptor();
    descriptor.useMemory(getPointer());
    write();
    descriptor.read();
    return descriptor;
  }

  public static class ByReference
      extends DeviceDescriptor
      implements com.sun.jna.Structure.ByReference
  {
  }

  public static class ByValue
      extends DeviceDescriptor
      implements com.sun.jna.Structure.ByValue
  {
  }

}
